package com.ruoyi.web.controller.app.controller;

import com.ruoyi.framework.web.exception.base.XResult;
import com.ruoyi.web.controller.app.service.AppIdInteractionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName AppIdInteractionController
 * @Description TODO
 * @Author tyc@yanyu
 * @Date 2018/12/29 0029 11:17
 **/
@RestController
@RequestMapping("/app/getIdInteraction")
@Api(tags = "IM、社交id交互接口")
public class AppIdInteractionController {
    @Autowired
    private AppIdInteractionService appIdInteractionService;
    @PostMapping("getImIDByMemberId")
    @ApiOperation(value = "通过memberId查询ImID号")
    @ApiImplicitParam(name = "memberId", value = "用户ID号", required = true, dataType = "String", paramType = "query")
    public XResult getIMIdById(String memberId){
        return new XResult("操作成功",appIdInteractionService.getIMId(memberId));
    }
    @PostMapping("getMemberIdByIMId")
    @ApiOperation(value = "通过ImID查询memberId号")
    @ApiImplicitParam(name = "IMId", value = "IM ID号", required = true, dataType = "String", paramType = "query")
    public XResult getMemberIdById(String IMId){
        return new XResult("操作成功",appIdInteractionService.getMemberId(IMId));
    }
}
